<style>
    .form-horizontal .control-label {
    width: 140px;
    }
    
</style>
<?php if (AuthComponent::user()==NULL){ ?>
    <?php if (isset($exist)) {
    ?>
        <div class="alert alert-error">
            <button type="button" class="close" data-dismiss="alert">×</button>
            El usuarios <strong> <?php echo $exist;?></strong> ya se encuentra registrado.
        </div>
    <?php } ?>

    
    <div class="row-fluid">
        <div class="span3"></div>
        
        <div class="span6">

        <?php echo $this->Form->create('User', array('class'=>'form-horizontal well')); ?>
            <fieldset>
            <legend><?php echo __('Registro'); ?></legend>
            <?php
                $optionsLabel = array('class' => 'control-label','text'=>'Usuario');
                $options = array('div' => 'control-group','label'=>$optionsLabel,'class'=>'controls');         
                echo $this->Form->input('username',$options);

                $optionsLabelMail = array('class' => 'control-label','text'=>'email');
                $optionsMail = array('div' => 'control-group','label'=>$optionsLabelMail,'class'=>'controls');    
                echo $this->Form->input('email',$optionsMail);
                
                $optionsLabelPass = array('class' => 'control-label','text'=>'Contraseña');
                $optionsPass = array('div' => 'control-group','label'=>$optionsLabelPass,'class'=>'controls');    
                echo $this->Form->input('password',$optionsPass);

                echo $this->Form->hidden('role',array('value'=>'author'));

                $optionsBtn = array('label' => 'Registrarse','class' => 'btn btn-large btn-inverse pull-right','div' => 'form-actions');
                echo $this->Form->end($optionsBtn);
            ?>
            </fieldset>

        </div>
        <div class="span3"></div>
    </div>
<?php } else {?>
    <?php echo '<h4>'.AuthComponent::user('username').', </h4>'.'</h5>'.'usted ya se encuentra autentificado'.'</h5>';?> 
    
    
<?php } ?>

    
    
        